package com.zoffy.ybuhelper.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import com.zoffy.ybuhelper.pojo.entity.Message;

import java.util.List;

@Dao
public interface MessageDao {
    @Query("SELECT COUNT(*) FROM gpt_message")
     int countMessage();
    @Query("SELECT id,origin,message FROM gpt_message ORDER BY Id DESC LIMIT :start,:pageSize")
    List<Message> getMessage(int start,int pageSize);
    @Insert
    void insert(Message message);
}
